package com.cloudfunx.common.util;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * @author linjiayu
 */
public class TimeUtils {
    public static String getLocalDateTimeFormat(LocalDateTime time , String format){
        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern(format);
        return dateTimeFormatter.format(time);
    }

    public static String getLocalDateFormat(LocalDate time , String format){
        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern(format);
        return dateTimeFormatter.format(time);
    }
}
